Get Customer Offers [Version 3]
This API is used to retrieve a list of all customer offers that were created by the customer, identified by “customer/{id}” in the following URL, for the customer/{id}’s sub-customers.
Version 3 of this API provides this additional information:
-
Creation of a new Plan-type Rate offer
-
Linked offer(s) information
-
Rate-type offer(s) Plan Cost settings
-
Renewal date comprehensive information
-
Expiration date comprehensive information
-
Self-service information
|
HTTP URL |
|
|---|---|
|
GET |
/api/v3/customer/{id}/offer/created-offers |
Eligibility
The Requester is eligible to request information on offers that it created and that are available for attachment to sub-customers.
API Request
This API has no request structure.
API Response
Response Structure
|
Parameter |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
errorCode |
String |
O |
Failure code. |
|
errorMessage |
String |
O |
Failure message. |
|
content |
Object |
O |
Array of main response body object displayed when an API call was successful. For a failure, it will be empty. |
|
pageable |
Object |
O |
Paging information object displayed when an API call was successful. For a failure, it will be empty. |
Content data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
id |
UUID |
M |
Offer ID |
|
name |
String |
M |
Offer name |
|
description |
String |
O |
Offer description |
|
type |
String |
M |
Individual offer type. ENUM: RATE, MONEY, USAGE, POOL |
|
cost |
Decimal |
M |
Cost of the offer. May contain a decimal value. If no cost is applied, send 0 (zero). POOL plan type definitions: FIXED: Cost of the offer, as like all other offer types ACCUMULATIVE: Cost that is added with every added subscriber |
|
currency |
String |
M |
Cost currency, such as USD, GBP, EUR. |
|
creationTime |
DateTime |
M |
Offer creation timestamp |
|
renewalInterval |
String |
M |
Renewal period interval. ENUM valid values: DAILY, WEEKLY, MONTHLY, QUARTERLY, SEMI_ANNUALLY, ANNUALLY, ONE_TIME |
|
renewalIntervalMethod |
String |
CM |
Determines how to set the renewal day. ENUM valid values:
|
|
renewalIntervalDay |
Numeric |
CM |
Determines the renewal day of the selected period. ENUM valid values:
Populated only if SELF_DEFINED or FIRST_DAY has been set for the renewalIntervalMethod attribute. |
|
expirationType |
String |
O |
Determines how to set the expiration date. ENUM valid values: FIXED: Fixed, predefined expiration date. RELATIVE_ATTACHED: Time duration from the moment the plan was attached to the subscriber (SIM), for example, 10 days. RELATIVE_FIRST_USE: Time duration from the time the plan was first used by the subscriber, for example 10 days. If not sent, the plan will not expire at all. |
|
expirationDate |
Date |
CM |
Determines the requested date as per the selected expirationType. Populated only if the expirationType parameter has been set to FIXED. Empty for other expirationType settings or no expiration type. |
|
expirationUnit |
String |
CM |
Determines the time unit that should be used for expiration calculation. ENUM valid values: DAY, WEEK, MONTH, YEAR Empty if the selected expirationType is FIXED or no expiration type. |
|
expirationValue |
Numeric |
CM |
Determines the requested time value as per the selected expirationUnit. Empty if the selected expirationType is FIXED or no expiration type. |
|
isProrated |
Boolean |
M |
Plan proration. True = Proration will be calculated when attaching this plan False = There is no proration A Pool plan is always False. |
|
money |
Object |
CM |
Money type object. Populated when a MONEY offer type is returned Empty if a RATE, USAGE or POOL offer type is returned |
|
rate |
Object |
CM |
Rate type object. Populated whena RATE offer type is returned Empty if a USAGE, MONEY or POOL offer type is returned |
|
usage |
Object |
CM |
Usage type object. Populated when a USAGE offer type is returned Empty if a RATE, MONEY or POOL offer type is returned |
|
pool |
Object |
CM |
Pool plan type object. Populated when a POOL offer type is returned Empty if any other offer type is returned (USAGE, RATE, MONEY). |
|
eligibleSubAccountIds |
String |
M |
Array of sub account UUIDs. Specified sub account\s are the accounts that are eligible to view and manage (attach/detach) this offer as part of the self-service feature.
|
|
availabilityZone |
Object |
O |
Array of availability zones object that are assigned to this plan. Empty array means that the plan is available in any zone. |
|
linkedOffers |
Object |
O |
Array of offer(s) object linked to this offer. The order of the instances in the array determines their priority for charging. An Empty array means that the created offer has no linked offers. |
Money data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
activationType |
String |
M |
Displays plan activation behavior. Valid values:
|
Rate data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
type |
String |
M |
Rate offer type. ENUM valid values: ACCOUNT, PLAN_FIXED, PLAN_CUSTOMIZED |
|
dataLimit |
Decimal |
O |
Displays the maximal allowed DATA usage consumption. |
|
dataLimitUnitType |
String |
CM |
Data limit unit type. Valid values: KB, MB, GB Populated when data limit exists. |
|
smsLimit |
Decimal |
O |
Displays the maximal allowed SMS usage consumption. Unit counting is always a ‘unit’. |
Usage data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
activationType |
String |
M |
Displays plan activation behavior. Valid values:
|
|
usageType |
Object |
M |
Array of usage types object. |
Usage Type data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
type |
String |
M |
Type of the usage. Valid values: DATA, SMS |
|
value |
Decimal |
M |
Overall allowance value for regular offer or for FIXED-type Pool Plan. Allowance value per every added subscriber for ACCUMULATIVE-type Pool Plan. Data consumption for DATA type. Unit counting for SMS type. |
|
unitType |
String |
CM |
Populated when usage type is set to DATA. |
Pool data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
subAccount |
String |
M |
Name of the sub account for which the Pool Plan was created. No longer valid. Populated always with a ‘NULL’ string.List of eligible sub accounts is provided in ‘eligibleSubAccountIds’ |
|
type |
String |
M |
Pool plan type. Valid values: FIXED, ACCUMULATIVE |
|
activationType |
String |
M |
Defines pool plan activation behavior. Valid values:
|
|
poolusageType |
Object |
M |
Array of (pool) usage types object. |
Pool Usage Type data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
type |
String |
M |
Type of the usage. ENUM valid values: DATA, SMS |
|
value |
Decimal |
M |
Allowance value. Data consumption for DATA type. Unit counting for SMS type. |
|
unitType |
String |
CM |
Usage unit type = DATA ENUM valid values: KB, MB, GB Mandatory for DATA usage type. Empty for SMS usage type. Ignored if populated for SMS usage type. |
|
limitValue |
Decimal |
O |
Defines usage limit value. Data consumption for DATA type. Unit counting for SMS type. |
|
limitUnitType |
String |
CM |
|
Availability Zone data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
id |
UUID |
M |
Universal unique ID of the customer's availability zones. |
|
name |
String |
M |
Customer's availability zone name. |
Linked Offers data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
id |
UUID |
M |
Universal unique ID of the offer to link to this offer. |
|
isPinned |
Boolean |
O |
Denotes whether or not the linked offer can be removed from the parent offer.
|
Pageable data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
page |
Numeric |
M |
Page number |
|
size |
Numeric |
M |
Page size. Number of requested elements per page |
|
totalPages |
Numeric |
M |
Total amount of available pages per requested page size |
|
totalElements |
Numeric |
M |
Total amount of retrieved elements |
Error Codes
In addition to the general success and failure codes, the following error codes are possible.
|
Code |
Message |
|---|---|
|
GLOBAL_1001 |
Service unavailable. Please try again |
|
CUSTOMER_1002 |
Customer does not exist |
|
CUSTOMER_1006 |
Failed to retrieve customer details |
Examples
Request Body
{
}
Response Body: Regular Plan (Money) Success ACK:
{
"errorCode": "",
"errorMessage": "",
"content": [
{
"id": "e7fcef24-5c03-41dd-9e33-995b7d6f47a7",
"name": "roaming",
"description": "roaming bundle",
"type": "MONEY",
"cost": 20.5,
"currency": "USD",
"creationTime": "2020-07-01T00:00:00.977Z",
"renewalInterval": "MONTHLY",
"renewalIntervalMethod": "FIRST_DAY",
"renewalIntervalDay": "",
"expirationType": "FIXED",
"expirationDate": "13092023",
"expirationUnit": "",
"expirationValue": "",
"isProrated": true,
"availabilityZone": [
{
"id": "1b15048b-1ed4-4d34-a074-c7e26520e12a",
"name": "North America 05"
}
],
"money": [
{
"activationType": "REGULAR"
}
],
"eligibleSubAccountIds": [
"ee74dca6-8e7f-4b85-a42b-13860913b3b1",
"ff74dca6-8e7f-4b85-a42b-13860913b370"
],
"linkedOffers": [
{
"id": "ee74dca6-8e7f-4b85-a42b-13860913b3b1",
"isPinned": true
},
{
"id": "ff74dca6-8e7f-4b85-a42b-13860913b370",
"isPinned": true
}
]
},
{
"id": "ff74dca6-8e7f-4b85-a42b-13860913b370",
"name": "regular",
"description": "regular bundle",
"type": "MONEY",
"creationTime": "2020-07-01T00:00:00.977Z",
"renewalInterval": "MONTHLY",
"renewalIntervalMethod": "SELF_DEFINED",
"renewalIntervalDay": "10",
"expirationType": "RELATIVE_ATTACHED",
"expirationDate": "",
"expirationUnit": "WEEK",
"expirationValue": "4",
"isProrated": true,
"availabilityZone": [],
"money": [
{
"activationType": "REGULAR"
}
],
"eligibleSubAccountIds": [],
"linkedOffers": []
}
],
"pageable": {
"page": 1,
"size": 10,
"totalPages": 1,
"totalElements": 2
}
}
Response Body: Pool Plan Success ACK
{
"errorCode": "",
"errorMessage": "",
"content": [
{
"id": "e7fcef24-5c03-41dd-9e33-995b7d6f47a7",
"name": "family 50GB+",
"description": "family bundle",
"type": "POOL",
"creationTime": "2020-07-01T00:00:00.977Z",
"renewalInterval": "MONTHLY",
"renewalIntervalMethod": "FIRST_DAY",
"renewalIntervalDay": "",
"expirationType": "FIXED",
"expirationDate": "13092023",
"expirationUnit": "",
"expirationValue": "",
"isProrated": false,
"availabilityZone": [
{
"id": "1b15048b-1ed4-4d34-a074-c7e26520e12a",
"name": "North America 05"
}
],
"pool": [
{
"subAccount": "Gualas LTD.",
"type": "FIXED",
"cost": 15,
"currency": "USD",
"activationType": "REGULAR",
"poolUsageType": [
{
"type": "DATA",
"value": 50,
"unitType": "GB",
"limitValue": 20,
"limitUnitType": "GB"
},
{
"type": "SMS",
"value": 100,
"unitType": "",
"limitValue": 10,
"limitUnitType": ""
}
]
}
],
"eligibleSubAccountIds": [
"ee74dca6-8e7f-4b85-a42b-33860913b3b1"
],
"linkedOffers": [
{
"id": "ee74dca6-8e7f-4b85-a42b-13860913b3b1",
"isPinned": true
},
{
"id": "ff74dca6-8e7f-4b85-a42b-13860913b370",
"isPinned": true
}
]
}
],
"pageable": {
"page": 1,
"size": 10,
"totalPages": 1,
"totalElements": 2
}
}
Response Body: Failure NAK
{
"errorCode": "GLOBAL_1001",
"errorMessage": "Service unavailable. Please try again",
"content": "",
"pageable": ""
}